﻿cmake_minimum_required(VERSION 3.5)
project(CppServer VERSION 0.1 LANGUAGES CXX)

# 定义项目源文件
set(PROJECT_SOURCES
    main.cpp
    Business/businessinit.cpp
    Business/businessnetwork.cpp
    Network/network.cpp
    Business/businessmsghandler.cpp
    Business/businessuser.cpp
    Business/businesssql.cpp
    Business/businessfile.cpp
    Business/businessgroup.cpp
    # ... 其他源文件
)

set(PROJECT_HEADERS
    Business/businessinit.h
    Business/businessnetwork.h
    Network/network.h
    Business/businessmsghandler.h
    Business/businessuser.h
    Business/businesssql.h
    Business/businessfile.h
    Business/businessgroup.h
)

# 如果server也需要使用libhv或其他特定库，可以在这里添加
find_package(libhv CONFIG REQUIRED)

include_directories(../common)
# 添加可执行文件
add_executable(server ${PROJECT_SOURCES} ${PROJECT_HEADERS})

# 链接common库与hv库
target_link_libraries(server PRIVATE hv common)




